package com.hl.yyx.common.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class BaseModelDTO implements Serializable {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "操作ip", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String operatorIp;

    @ApiModelProperty(value = "创建人", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "创建人id", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String creatorId;


    @ApiModelProperty(value = "操作人", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String operator;


    @ApiModelProperty(value = "操作人id", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String operatorId;

    @ApiModelProperty(value = "逻辑删除")
//    @TableLogic(value = "0", delval = "1")
    @JsonIgnore
    private Boolean deleted;
}
